# -*- coding: UTF-8 -*-
'''
@Project ：pythonProject 
@File    ：coverchooseDemo.py
@Author  ：siwei
@Date    ：2023/5/17 23:20 
'''
# 嵌套结构

# 会员 >=200  8折
#     >=100  9折
#     不打折
# 非会员 >=200  9.5折
#     不打折


def judge():
    answer = input("您是会员吗?y/n:")
    if answer=='y':  # 会员
        money = float(input("您的购物金额为:"))
        if money>= 200:
            print("打8折,付款金额为:",money*0.8,"元")
        elif money>= 100:
            print("打9折,付款金额为:",money*0.9,"元")
        else:
            print("不打折,付款金额为:", money,"元")
    elif answer=='n':  # 非会员
        money = float(input("您的购物金额为:"))
        if money>= 200:
            print("打9.5折,付款金额为:",money*0.95,"元")
        else:
            print("不打折,付款金额为:", money,"元")
    else:
        print("您输入的内容错误,请重新输入")
        judge()

judge()